<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <script>
        let age = 20
        const haha = () => {
            console.log(123);
        }
        let obj = {
            name: 'zs',
            age: 18,
            say: () => {
                console.log(this.age);
            }
        }
        obj.say()
            // let age = 20

        // // 箭头函数中的 this 指向所在的上下文（区间）的 this 指向
        // let obj = {
        //     age: 18,
        //     say: () => {
        //         console.log(this.age)
        //     }
        // }

        // obj.say()
        // function handle() {
        //     console.log(arguments);
        // }
        // const handle = () => {
        //     console.log(arguments);

        // }//报错
        const handle = (...arr) => {
            console.log(arr);

        }
        handle(1, 2, 3, 4, 5)
    </script>
</body>

</html>